package com.group.app.example.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

@Data
@Entity
@Table(name = "field_node")
@AllArgsConstructor
@NoArgsConstructor
public class FieldNodeModel implements Serializable {

    @Column(unique = true)
    private String id;

    @Id
    @Column(nullable = true,insertable = false,updatable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer code;

    @Column(name="parent_code")
    private Integer parentCode;

    @Column(name="code_link")
    private String codeLink;

    @Column(name="parent_link")
    private String parentLink;

    @Column(name="parent_name")
    private String parentName;

    @Column
    private String name;

    @Column
    private String describe;

    @Column(name="is_node")
    private Boolean isNode;

    @Column(name="active_date")
    private Date activeDate;

    @Column(name="node_order")
    private Integer nodeOrder;

    @Column(name="update_user")
    private String updateUser;

    @Column(name="update_time")
    private Timestamp updateTime;

    @Column(name="create_user")
    private String createUser;

    @Column(name="create_time")
    private Timestamp createTime;

//    @JoinColumn(name = "node_id")
//    private FieldStationModel fieldStationModel;
}
